package com.xiake.core.constants;

import org.apache.commons.lang3.RandomUtils;

public class SMSCodeConstants {
	public static int USER_REGISTER = 1; //用户注册
	public static int MODIFY_PSWD = 2;  //修改密码
	public static int FORGET_PSWD = 3;  //忘记密码
	
	public static String SMS_HEAD = "尊敬的用户，您的验证码为:";
	//public static String SMS_FOOT = "，将在15分钟后过期。";
	
	public static int getCode(){
		int code = RandomUtils.nextInt(100000, 999999);
		return code;
	}
	
	public static String getFoot(int type){
		String foot = "，将在15分钟后过期";
		switch (type) {
		case 1:
			foot += "，您正在注册用户，注意保密哦。";
			break;
		case 2 : 
			foot += "，您正在修改密码，注意保密哦。";
			break;
		case 3 :
			foot += "，您正在找回密码，注意保密哦。";
			break;
		default:
			foot += "，注意保密哦。";
			break;
		}
		return foot;
	}
}
